package pl.register.android.lesson;

import pl.register.android.course.Course;
import pl.register.android.util.StringUtils;

import java.util.ArrayList;
import java.util.List;

/**
 * @author Mateusz Strzelecki
 * @since 2013-04-15
 */
public enum TagLesson {
    OCTOBER {
        @Override
        public String getNameWithYear(Course course) {
            return StringUtils.build(getName(), " ", course.getStartYear());
        }

        @Override
        public String getName() {
            return "Październik";
        }
    }, NOVEMBER {
        @Override
        public String getName() {
            return "Listopad";
        }

        @Override
        public String getNameWithYear(Course course) {
            return StringUtils.build(getName(), " ", course.getStartYear());
        }
    }, DECEMBER {
        @Override
        public String getName() {
            return "Grudzień";
        }

        @Override
        public String getNameWithYear(Course course) {
            return StringUtils.build(getName(), " ", course.getStartYear());
        }
    }, JANUARY {
        @Override
        public String getName() {
            return "Styczeń";
        }

        @Override
        public String getNameWithYear(Course course) {
            return StringUtils.build(getName(), " ", course.getEndYear());
        }
    }, FEBRUARY {
        @Override
        public String getName() {
            return "Luty";
        }

        @Override
        public String getNameWithYear(Course course) {
            return StringUtils.build(getName(), " ", course.getEndYear());
        }
    }, MARCH {
        @Override
        public String getName() {
            return "Marzec";
        }

        @Override
        public String getNameWithYear(Course course) {
            return StringUtils.build(getName(), " ", course.getEndYear());
        }
    }, APRIL {
        @Override
        public String getName() {
            return "Kwiecień";
        }

        @Override
        public String getNameWithYear(Course course) {
            return StringUtils.build(getName(), " ", course.getEndYear());
        }
    }, MAY {
        @Override
        public String getName() {
            return "Maj";
        }

        @Override
        public String getNameWithYear(Course course) {
            return StringUtils.build(getName(), " ", course.getEndYear());
        }
    }, JUNE {
        @Override
        public String getName() {
            return "Czerwiec";
        }

        @Override
        public String getNameWithYear(Course course) {
            return StringUtils.build(getName(), " ", course.getEndYear());
        }
    }, HOLIDAY_I {
        @Override
        public String getName() {
            return "WI";
        }

        @Override
        public String getNameWithYear(Course course) {
            return StringUtils.build(getName(), " ", course.getEndYear());
        }
    }, HOLIDAY_II {
        @Override
        public String getName() {
            return "WII";
        }

        @Override
        public String getNameWithYear(Course course) {
            return StringUtils.build(getName(), " ", course.getEndYear());
        }
    };

    public abstract String getName();

    public abstract String getNameWithYear(Course course);

    public static List<TagLesson> asList() {
        List<TagLesson> tags = new ArrayList<TagLesson>();
        for (TagLesson tag : values()) {
            tags.add(tag);
        }
        return tags;
    }

}
